package com.atcumt.alibaba;

import java.util.Arrays;
import java.util.Scanner;

/* 
 * 5 2
 * 1 4 2 3 5
 * 
 * 3
 */
public class Test03 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        long[] nums = new long[n];
        for (int i = 0; i < n; i++) {
            nums[i] = in.nextLong();
        }
        Arrays.sort(nums);

        long[] preSum = new long[n + 1];
        for (int i = 1; i <= n; i++) {
            preSum[i] = preSum[i - 1] + nums[i - 1];
        }
        int res = -1;
        for (int i = 1; i <= n; i++) {
            if (((((float)preSum[i]) / i) * k) <= nums[i - 1]) {
                res = i - 1;
                break;
            }
        }
        if (res == -1) {
            res = n;
        }
        System.out.println(res);
        
    }
}
